

# Paths for 64 bit compilation using the Sun Fote compiler. 
INCLUDES_CCFORTE64 = -I/home/hgsc/include/stlport/ $(INCLUDES_CC)
LIB_PATHSFORTE64 = -L/hgsc/forte/lib/ -L$(CBT_DEVEL_LIB) 
CCFLAGSFORTE64 = -DFORTE64 -fast -xtarget=ultra -xarch=v9 


INCLUDES_CCFORTE64g = -I/home/hgsc/include/stlport/ $(INCLUDES_CC)
LIB_PATHSFORTE64g = -L/hgsc/forte/lib/ -L$(CBT_DEVEL_LIB) 
CCFLAGSFORTE64g = -D_STLP_DEBUG -DFORTE64 -g -xtarget=ultra -xarch=v9 


# Make library using Sun Forte compiler compiling for 64-bit clean. 
_forte64:
	cd $(CBT_DEVEL_DIR); make forte64

# Make library using Sun Forte compiler compiling for 64-bit clean. 
_forte64g:
	cd $(CBT_DEVEL_DIR); make forte64g


#==============================================
#	Local libraries
#==============================================
#

forte64localobjs = $(libtargets:%=$(CBT_DEVEL_LIB)/%.forte64.o)
forte64glocalobjs = $(libtargets:%=$(CBT_DEVEL_LIB)/%.forte64g.o)

_forte64locallib: $(forte64localobjs)
_forte64glocallib: $(forte64glocalobjs)


# Compile local classes for Sun forte compiler, 64 bit clean. 
$(CBT_DEVEL_LIB)/%.forte64g.o: %.cc %.hh $(libdependencies)
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64g) $(INCLUDES_CCFORTE64g) -c -o $(CBT_DEVEL_LIB)/$*.forte64g.o $*.cc

# Compile local classes for Sun forte compiler, 64 bit clean. 
$(CBT_DEVEL_LIB)/%.forte64.o: %.cc %.hh $(libdependencies)
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64) $(INCLUDES_CCFORTE64) -c -o $(CBT_DEVEL_LIB)/$*.forte64.o $*.cc



# Compile C++ program with forte compiler and link with 64-bit library. 
%.forte64: %.cc _forte64locallib
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64) $(INCLUDES_CCFORTE64) -c -o $(CBT_DEVEL_LIB)/$*.forte64.o $*.cc
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64) -o $*.forte64 $(LIB_PATHSFORTE64) $(CBT_DEVEL_LIB)/$*.forte64.o $(forte64localobjs) -lstlport_sunpro64 -lhgsc-compbio.forte64
	cp -f $*.forte64 $(CBT_DEVEL_BIN)
	rm -f $*.forte64

# Compile C++ program with forte compiler and link with 64-bit library. 
%.forte64g: %.cc _forte64glocallib
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64g) $(INCLUDES_CCFORTE64g) -c -o $(CBT_DEVEL_LIB)/$*.forte64g.o $*.cc
	/hgsc/forte/bin/CC $(CCFLAGSFORTE64g) -o $*.forte64g $(LIB_PATHSFORTE64g) $(CBT_DEVEL_LIB)/$*.forte64g.o $(forte64glocalobjs) /home/hgsc/lib/libstlport_sunpro64_stldebug.a -lhgsc-compbio.forte64g
	cp -f $*.forte64 $(CBT_DEVEL_BIN)
	rm -f $*.forte64
